#ifndef HPLC_SPARKLINK_AUTOSAMPLER_PROTOCOL_H
#define HPLC_SPARKLINK_AUTOSAMPLER_PROTOCOL_H

#include "baseprotocol.h"
#include <QVariant>

namespace hplc
{
class AutoSamplerParam;
namespace sparklink
{
class HplcSparkLinkAutoSamplerSendPacket;
class HplcSparkLinkAutoSamplerParsePacket;
class HplcSparkLinkAutoSamplerProtocolData;
class HplcSparkLinkAutoSamplerProtocol : public BaseProtocol
{
    Q_OBJECT
public:
    HplcSparkLinkAutoSamplerProtocol(AutoSamplerParam &param, QObject *parent = nullptr);
    virtual ~HplcSparkLinkAutoSamplerProtocol() override;

    virtual bool setProtocolCmd(int id, QVariant &var) override;
    virtual bool getProtocolCmd(int id, QVariant &var) override;

    HplcSparkLinkAutoSamplerSendPacket *getSender();
    HplcSparkLinkAutoSamplerParsePacket *getParser();

    virtual ProtocolType getProtocolType() override;

public slots:
    virtual void onBaseTickTimeout() override;

protected:
    HplcSparkLinkAutoSamplerProtocol(HplcSparkLinkAutoSamplerProtocolData &data, AutoSamplerParam &param, QObject *parent = nullptr);

private:
    hplc::AutoSamplerParam			*m_param = nullptr;
};

} // sparklink
} // hplc

#endif // HPLC_SPARKLINK_AUTOSAMPLER_PROTOCOL_H
